/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.dp1.pucp.Simulacion.VIsta;

import com.dp1.pucp.Util.Validaciones;
import java.awt.event.ActionListener;
import java.util.ArrayList;
import javax.swing.JComboBox;

/**
 *
 * @author Rodrigo
 */
public class DetalleOperarioGUI extends javax.swing.JDialog {

    /**
     * Creates new form DetalleOperarioGUI
     */
    public DetalleOperarioGUI(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        setLocationRelativeTo(null);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        txtPHorneado = new javax.swing.JTextField();
        txtPRellenado = new javax.swing.JTextField();
        txtPDecorado = new javax.swing.JTextField();
        txtPEmpaquetado = new javax.swing.JTextField();
        txtMHorneado = new javax.swing.JTextField();
        txtMRellenado = new javax.swing.JTextField();
        txtMDecorado = new javax.swing.JTextField();
        txtMEmpaquetado = new javax.swing.JTextField();
        txtNombre = new javax.swing.JTextField();
        txtApePaterno = new javax.swing.JTextField();
        txtApeMaterno = new javax.swing.JTextField();
        txtSueldo = new javax.swing.JTextField();
        cmbTurno = new javax.swing.JComboBox();
        jLabel13 = new javax.swing.JLabel();
        btnGuardar = new javax.swing.JButton();
        btnCerrar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Detalle Operario"));

        jLabel1.setText("Nombre");

        jLabel2.setText("Apellido Paterno");

        jLabel3.setText("Apellido Materno");

        jLabel4.setText("Sueldo");

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Rendimiento Produccion"));

        jLabel5.setText("Produccion Horneado");

        jLabel6.setText("Merma Horneado");

        jLabel7.setText("Produccion Rellenado");

        jLabel8.setText("Merma Rellenado");

        jLabel9.setText("Produccion Decorado");

        jLabel10.setText("Merma Decorado");

        jLabel11.setText("Produccion Empaquetado");

        jLabel12.setText("Merma Empaquetado");

        txtPHorneado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtPHorneadoKeyTyped(evt);
            }
        });

        txtPRellenado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtPRellenadoKeyTyped(evt);
            }
        });

        txtPDecorado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtPDecoradoActionPerformed(evt);
            }
        });
        txtPDecorado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtPDecoradoKeyTyped(evt);
            }
        });

        txtPEmpaquetado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtPEmpaquetadoKeyTyped(evt);
            }
        });

        txtMHorneado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtMHorneadoKeyTyped(evt);
            }
        });

        txtMRellenado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtMRellenadoKeyTyped(evt);
            }
        });

        txtMDecorado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtMDecoradoKeyTyped(evt);
            }
        });

        txtMEmpaquetado.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtMEmpaquetadoKeyTyped(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel11)
                            .addComponent(jLabel5)
                            .addComponent(jLabel7))
                        .addGap(12, 12, 12)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtPRellenado, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtPHorneado, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(txtPDecorado, javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(txtPEmpaquetado, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addComponent(jLabel9))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel8)
                    .addComponent(jLabel6)
                    .addComponent(jLabel10)
                    .addComponent(jLabel12))
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(16, 16, 16)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtMRellenado, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtMHorneado, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtMDecorado, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtMEmpaquetado, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(0, 40, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(jLabel6)
                    .addComponent(txtPHorneado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtMHorneado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(jLabel8)
                    .addComponent(txtPRellenado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtMRellenado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(jLabel10)
                    .addComponent(txtPDecorado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtMDecorado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(txtPEmpaquetado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12)
                    .addComponent(txtMEmpaquetado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        txtApePaterno.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtApePaternoActionPerformed(evt);
            }
        });

        jLabel13.setText("Turno");

        btnGuardar.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/save.png"))); // NOI18N
        btnGuardar.setText("Guardar");
        btnGuardar.setBorderPainted(false);
        btnGuardar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnGuardar.setMaximumSize(new java.awt.Dimension(57, 29));
        btnGuardar.setMinimumSize(new java.awt.Dimension(57, 29));
        btnGuardar.setPreferredSize(new java.awt.Dimension(57, 29));
        btnGuardar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        btnCerrar.setFont(new java.awt.Font("Ubuntu", 0, 10)); // NOI18N
        btnCerrar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagenes/Logout.png"))); // NOI18N
        btnCerrar.setText("Cerrar");
        btnCerrar.setBorderPainted(false);
        btnCerrar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnCerrar.setMaximumSize(new java.awt.Dimension(57, 29));
        btnCerrar.setMinimumSize(new java.awt.Dimension(57, 29));
        btnCerrar.setPreferredSize(new java.awt.Dimension(57, 29));
        btnCerrar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel2)
                            .addComponent(jLabel3)
                            .addComponent(jLabel4)
                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel13))
                        .addGap(41, 41, 41)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtApeMaterno)
                            .addComponent(txtApePaterno)
                            .addComponent(txtNombre)
                            .addComponent(txtSueldo)
                            .addComponent(cmbTurno, 0, 100, Short.MAX_VALUE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(50, 50, 50)
                        .addComponent(btnGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 63, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(btnCerrar, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(56, 56, 56))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(32, 32, 32))))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(txtApePaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(txtApeMaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(txtSueldo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel13)
                            .addComponent(cmbTurno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(33, 33, 33)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnGuardar, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnCerrar, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(19, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void txtApePaternoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtApePaternoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtApePaternoActionPerformed

    private void txtPDecoradoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtPDecoradoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtPDecoradoActionPerformed

    private void txtPHorneadoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtPHorneadoKeyTyped
        // TODO add your handling code here:
        String car = txtPHorneado.getText();
        if(car.length()>=9) evt.consume();        
        Validaciones.soloDigito(evt);
    }//GEN-LAST:event_txtPHorneadoKeyTyped

    private void txtPRellenadoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtPRellenadoKeyTyped
        // TODO add your handling code here:
        String car = txtPRellenado.getText();
        if(car.length()>=9) evt.consume();        
        Validaciones.soloDigito(evt);
    }//GEN-LAST:event_txtPRellenadoKeyTyped

    private void txtPDecoradoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtPDecoradoKeyTyped
        // TODO add your handling code here:
        String car = txtPDecorado.getText();
        if(car.length()>=9) evt.consume();        
        Validaciones.soloDigito(evt);
    }//GEN-LAST:event_txtPDecoradoKeyTyped

    private void txtPEmpaquetadoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtPEmpaquetadoKeyTyped
        // TODO add your handling code here:
        String car = txtPEmpaquetado.getText();
        if(car.length()>=9) evt.consume();        
        Validaciones.soloDigito(evt);
    }//GEN-LAST:event_txtPEmpaquetadoKeyTyped

    private void txtMHorneadoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtMHorneadoKeyTyped
        // TODO add your handling code here:
        String car = txtMHorneado.getText();
        if(car.length()>=9) evt.consume();        
        Validaciones.soloDigito(evt);
    }//GEN-LAST:event_txtMHorneadoKeyTyped

    private void txtMRellenadoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtMRellenadoKeyTyped
        // TODO add your handling code here:
        String car = txtMRellenado.getText();
        if(car.length()>=9) evt.consume();        
        Validaciones.soloDigito(evt);
    }//GEN-LAST:event_txtMRellenadoKeyTyped

    private void txtMDecoradoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtMDecoradoKeyTyped
        // TODO add your handling code here:
        String car = txtMDecorado.getText();
        if(car.length()>=9) evt.consume();        
        Validaciones.soloDigito(evt);
    }//GEN-LAST:event_txtMDecoradoKeyTyped

    private void txtMEmpaquetadoKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtMEmpaquetadoKeyTyped
        // TODO add your handling code here:
        String car = txtMEmpaquetado.getText();
        if(car.length()>=9) evt.consume();        
        Validaciones.soloDigito(evt);
    }//GEN-LAST:event_txtMEmpaquetadoKeyTyped

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(DetalleOperarioGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(DetalleOperarioGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(DetalleOperarioGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(DetalleOperarioGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                DetalleOperarioGUI dialog = new DetalleOperarioGUI(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }
    
    public void setNombre(String nombre){
        this.txtNombre.setText(nombre);        
        this.txtNombre.setEnabled(false);
    }
    
    public void setAPaterno(String apaterno){
        this.txtApePaterno.setText(apaterno);        
        this.txtApePaterno.setEnabled(false);
    }
    
    public void setAMaterno(String amaterno){
        this.txtApeMaterno.setText(amaterno);        
        this.txtApeMaterno.setEnabled(false);
    }
    
    public void setSueldo(double sueldo){
        this.txtSueldo.setText(String.valueOf(sueldo));        
        this.txtSueldo.setEnabled(false);
    }
    
    public void setPHorneado(int phorneado){
        this.txtPHorneado.setText(String.valueOf(phorneado));        
        //this.txtPHorneado.setEnabled(false);
    }
    
    public void setMHorneado(int mhorneado){
        this.txtMHorneado.setText(String.valueOf(mhorneado));        
        //this.txtMHorneado.setEnabled(false);
    }
    
    public void setPRellenado(int prellenado){
        this.txtPRellenado.setText(String.valueOf(prellenado));        
        //this.txtPRellenado.setEnabled(false);
    }
    
    public void setMRellenado(int mhorneado){
        this.txtMRellenado.setText(String.valueOf(mhorneado));        
        //this.txtMRellenado.setEnabled(false);
    }
    
    public void setPDecorado(int pdecorado){
        this.txtPDecorado.setText(String.valueOf(pdecorado));        
        //this.txtPDecorado.setEnabled(false);
    }
    
    public void setMDecorado(int mdecorado){
        this.txtMDecorado.setText(String.valueOf(mdecorado));        
        //this.txtMDecorado.setEnabled(false);
    }
    
    public void setPEmpaquetado(int pempaquetado){
        this.txtPEmpaquetado.setText(String.valueOf(pempaquetado));        
        //this.txtPEmpaquetado.setEnabled(false);
    }
    
    public void setMEmpaquetado(int mempaquetado){
        this.txtMEmpaquetado.setText(String.valueOf(mempaquetado));        
        //this.txtMEmpaquetado.setEnabled(false);
    }
    
    public int getPHorneado(){
        int res= Integer.parseInt(this.txtPHorneado.getText());
        return res;       
    }
    
    public int getMHorneado(){
        int res= Integer.parseInt(this.txtMHorneado.getText());
        return res;       
    }
    
    public int getPRellenado(){
        int res= Integer.parseInt(this.txtPRellenado.getText());
        return res;       
    }
    
    public int getMRellenado(){
        int res= Integer.parseInt(this.txtMRellenado.getText());
        return res;       
    }
    
    public int getPDecorado(){
        int res= Integer.parseInt(this.txtPDecorado.getText());
        return res;       
    }
    
    public int getMDecorado(){
        int res= Integer.parseInt(this.txtMDecorado.getText());
        return res;       
    }
    
    public int getPEmpaquetado(){
        int res= Integer.parseInt(this.txtPEmpaquetado.getText());
        return res;       
    }
    
    public int getMEmpaquetado(){
        int res= Integer.parseInt(this.txtMEmpaquetado.getText());
        return res;       
    }
    
    public void llenaComboTurno(ArrayList<String> lista){
        if(lista!=null){
            for (String opc : lista){
                cmbTurno.addItem(opc);
            }
        }
    } 
    
    public JComboBox getCombo(){
        return cmbTurno;
    }
    
    public void mostrarAviso(String msn){
        Validaciones.mostrarMensajeAvisoVal(msn);   
    }
    
    public void mostrarError(String msn){
        Validaciones.mostrarMensajeErrorVal(msn);
    }
    
    
    public void addGuardarListener(ActionListener ml){ this.btnGuardar.addActionListener(ml); } 
    public void addCerrarListener(ActionListener ml){ this.btnCerrar.addActionListener(ml); } 
//    public void addActivarListener(ActionListener ml){ this.btnActivar.addActionListener(ml); }
//    public void addCancelarListener(ActionListener ml){ this.btnCancelar.addActionListener(ml); }
    
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCerrar;
    private javax.swing.JButton btnGuardar;
    private javax.swing.JComboBox cmbTurno;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JTextField txtApeMaterno;
    private javax.swing.JTextField txtApePaterno;
    private javax.swing.JTextField txtMDecorado;
    private javax.swing.JTextField txtMEmpaquetado;
    private javax.swing.JTextField txtMHorneado;
    private javax.swing.JTextField txtMRellenado;
    private javax.swing.JTextField txtNombre;
    private javax.swing.JTextField txtPDecorado;
    private javax.swing.JTextField txtPEmpaquetado;
    private javax.swing.JTextField txtPHorneado;
    private javax.swing.JTextField txtPRellenado;
    private javax.swing.JTextField txtSueldo;
    // End of variables declaration//GEN-END:variables
}
